<?php
html::printPath(html::createCrudPath('viSeminar', $viSeminar, 'name', 'id'));
$msg->printMessages();

$fb = new FormBuilder('viSeminar', $viSeminar);
$fb->autocompleter('name', $nameAcValues)->required()->styleClass('seminarNameField');
$fb->text('instructor')->required();
$fb->delimiter();
$fb->date('begin_date')->required();
$fb->time('begin_time')->required();
$fb->delimiter();
$fb->date('end_date')->required();
$fb->time('end_time')->required();
$fb->delimiter();
$fb->comboBox('bank_account_id', $bankAccountOptions)->required();
$fb->text('variable_symbol')->required();
$fb->delimiter();
$fb->textarea('description')->required();
$fb->text('info_url')->required();
$fb->delimiter();
$fb->yesNoBox('last_meal_in_package_option')->required();
$fb->yesNoBox('meals_optional')->noEmptyOption()->required();
$fb->date('early_discount_deadline');
$fb->yesNoBox('cash_payment_available')->noEmptyOption()->required();
$fb->delimiter();
$fb->yesNoBox('active')->noEmptyOption();
$fb->delimiter();
$fb->textarea('notes');
$fb->selectMany('vi_seminar_tag_ids', $viSeminarTagOptions)
    ->ajaxCreateButton('/admin/viSeminarTag/edit');
$fb->submitButton();
$fb->write();
